package com.aspose.cells;

public class VerticalPageBreakCollection extends CollectionBase {
   public VerticalPageBreak get(int index) {
      return (VerticalPageBreak)this.a.get(index);
   }

   public VerticalPageBreak get(String cellName) {
      byte var2 = 0;
      byte var3 = 0;
      int[] var4 = new int[]{var2};
      int[] var5 = new int[]{var3};
      CellsHelper.a(cellName, var4, var5);
      int var8 = var4[0];
      int var9 = var5[0];

      for(int var6 = 0; var6 < this.a.size(); ++var6) {
         VerticalPageBreak var7 = this.get(var6);
         if (var7.getColumn() == var9 && var7.getStartRow() <= var8 && var7.getEndRow() >= var8) {
            return var7;
         }
      }

      return null;
   }

   public int add(int startRow, int endRow, int column) {
      if (this.a.size() >= 1024) {
         throw new CellsException(10, "The count of VPageBreaks cannot be larger than 1024.");
      } else {
         VerticalPageBreak var4 = null;

         for(int var5 = 0; var5 < this.a.size(); ++var5) {
            var4 = this.get(var5);
            if (var4.getColumn() == column && var4.getStartRow() <= startRow && var4.getEndRow() >= startRow) {
               var4.a(startRow);
               var4.b(endRow);
               return var5;
            }
         }

         var4 = new VerticalPageBreak(column);
         var4.a(startRow);
         var4.b(endRow);
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var4);
         return this.a.size() - 1;
      }
   }

   void a(int var1, int var2, int var3) {
      VerticalPageBreak var4 = new VerticalPageBreak(var3);
      var4.a(var1);
      var4.b(var2);
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var4);
   }

   public int add(int column) {
      return this.add(0, 1048575, column);
   }

   public int add(int row, int column) {
      return this.add(0, 1048575, column);
   }

   public int add(String cellName) {
      byte var2 = 0;
      byte var3 = 0;
      int[] var4 = new int[]{var2};
      int[] var5 = new int[]{var3};
      CellsHelper.a(cellName, var4, var5);
      int var6 = var4[0];
      int var7 = var5[0];
      return this.add(0, 65535, var7);
   }

   void a(VerticalPageBreakCollection var1) {
      for(int var2 = 0; var2 < var1.a.size(); ++var2) {
         VerticalPageBreak var3 = var1.get(var2);
         this.a(var3.getStartRow(), var3.getEndRow(), var3.getColumn());
      }

   }

   public void removeAt(int index) {
      VerticalPageBreak var2 = (VerticalPageBreak)this.a.get(index);
      super.removeAt(index);
   }
}
